<?php
    require_once("facebook.php");

    $app_id = "286057774832675";
    $app_secret = "dce80ed8770a743a72f9d31ee7eced93";

    $facebook = new Facebook(array(
        'appId' => $app_id,
        'secret' => $app_secret,
        'cookie' => true
    ));

    if(is_null($facebook->getUser()))
    {
        header("Location:{$facebook->getLoginUrl(array('req_perms' => 'user_status,publish_stream,user_photos'))}");
        exit;
    }
?>